package com.xq.sboot;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.Marker;
import org.slf4j.MarkerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;

import java.io.File;

/**
 * 功能说明:主应用程序.
 *
 * @author <a href="https://gitee.com/gkq/microservice">郭凯强</a>
 * @version 1.0.0
 * @since 2018-12-09 10:51
 */
@SpringBootApplication
@ServletComponentScan(basePackages = "com.xq.sboot.servlet")
@EnableGlobalMethodSecurity(prePostEnabled = true, jsr250Enabled = true)
public class Application {
    private static final Logger logger = LoggerFactory.getLogger(Application.class);
    private static final Marker marker = MarkerFactory.getMarker("Application");

    public static void main(String[] args) {
        logger.debug(marker, "当前目录={}", new File(".").getAbsolutePath());
        SpringApplication.run(Application.class, args);
    }
}
